//
//  QJMineSYHeaderView.m
//  QuanJieShopProject
//
//  Created by apple on 2018/2/26.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "QJMineNewSYHeaderView.h"

@implementation QJMineNewSYHeaderView
-(void)awakeFromNib{
    
    [super awakeFromNib];
   
}
- (IBAction)headerBtnClickAction:(UIButton *)sender {
    if (self.headerBtnClickBlockAction) {
        self.headerBtnClickBlockAction(sender.tag);
    }
}
- (void)setupHeaderUIAction{
   
    self.syLSBtn.layer.borderColor = [UIColor whiteColor].CGColor;
    self.syLSBtn.layer.borderWidth = 1.0;
    self.syLSBtn.layer.cornerRadius = 15.0;
    self.syLSBtn.layer.masksToBounds = YES;
    
    self.syGoTX.layer.borderColor = HexRGB(0x0589E8).CGColor;
    self.syGoTX.layer.borderWidth = 1.0;
    self.syGoTX.layer.cornerRadius = 15.0;
    self.syGoTX.layer.masksToBounds = YES;
    
    self.syTopView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.1];
    
    
    
}
- (void)headerUpdateWithModel:(MineShouYiNewModel *)model{
    if (model) {
        
        self.syMoneyLabel.text = model.total_business;
        self.syDJLabel.text =  model.frozen_business;
        self.syTXLabel.text =  model.raise_business;
        self.syKTXLabel.text =  model.balance_income;
        [self.syZSBtn setTitle:[NSString stringWithoutNilFormart: model.yesterday_dner] forState:UIControlStateNormal];
         [self.zyZSBtn setTitle:[NSString stringWithoutNilFormart:  model.yesterday_yb] forState:UIControlStateNormal];
        //金第纳尔
        self.jdnrOneLabel.text = model.balance_gold;
        self.jdnrTwoLabel.text = model.frozen_gold;
        self.jdnrThreeLabel.text = model.raise_silver;
        self.jybFourLabel.text = model.yesterday_income;
        
        //金元宝
        self.jybOneLabel.text = model.gold_ky;
        self.jybTwoLabel.text = model.gold_df;
        self.jybThreeLabel.text = model.gold_yk;
        self.jybFourLabel.text = model.gold_sy;
        //银第纳尔
        self.ydneOneLabel.text = model.raise_gold;
        self.ydneTwoLabel.text = model.balance_silver;
        self.ydneThreeLabel.text = model.yesterday_silver;
        
        //银元宝
        self.yybOneLabel.text = model.silver_ky;
        self.yybTwoLabel.text = model.silver_yxf;
        self.yybThreeLabel.text = model.silver_zr_sy;
        self.yybFourLabel.text = model.silver_total_sy;
        self.yybFiveLabel.text = model.balance_integral;
        
    }
    
    self.zrybfhzs.hidden = YES;
    self.jyb.hidden = YES;
    self.jybL.hidden = YES;
    self.jybDetail.hidden = YES;
    self.jybsy.hidden = YES;
    self.yyb.hidden = YES;
    self.yybD.hidden = YES;
    self.yybDetail.hidden = YES;
    self.lineLabel.hidden = YES;
    self.lineLabel2.hidden = YES;
    self.zrybfhzsHeight.constant = 0;
    self.JybHeight.constant = 0;
    self.JybsyHeight.constant = 0;
    self.yybHeight.constant = 0;
    self.yydHeight.constant = 0;
    self.jyblHeight.constant = 0;
    self.height.constant = 0;
    self.height2.constant = 0;
}
- (void)layoutSubviews{
   
   
    
}

@end
